package com.bao.work;

import java.math.BigDecimal;
import java.util.Random;

/**
 * @author baoye
 * @date 2024-07-24/18:21
 */
public class StringClass04 {
    public static void main(String[] args) {
        BigDecimal bd1= BigDecimal.valueOf(new Random().nextDouble()*100);
        System.out.println("随机数为:\n"+bd1.toString());
        System.out.println("转换为:\n"+bd1.divide(new BigDecimal("1"),2,1));

    }
}
